.qq-face-map {
  width: 29px;
  height: 25px;
  background-image: url("../assets/emoji/qqface.png");
  display: inline-block;
  vertical-align: middle;
}

.emoji-map {
  width: 25px;
  height: 25px;
  background-image: url(../assets/emoji/emoji2.png);
  display: inline-block;
  vertical-align: middle;
}








//@for $i from 0 through 104 {
//  .qq-face-map-#{$i} {
//    background-position: -29px * ($i%15) -29px * floor($i/15);
//  }
//}


.qq-face-map(104);
.qq-face-map(@n,@i:1) when (@i =< @n) {
  .qq-face-map-@{i} {
    background-position: -29px * mod(@i, 15) -29px * floor(@i / 15);
  }
  .qq-face-map(@n, (@i + 1));
}


//@for $i from 0 through 176 {
//  .emoji-#{$i} {
//    background-position: -28.8px * ($i%15) -29px * floor($i/15);
//  }
//}

.emoji-map(176);
.emoji-map(@n,@i:1) when (@i =< @n) {
  .emoji-@{i} {
    background-position: -28.8px * mod(@i, 15) -29px * floor(@i / 15);
  }
  .emoji-map(@n, (@i + 1));
}
